const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();

app.use(cors());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));


// 挂载路由
const userRouter = require('./router/userRouter');
app.use('/user', userRouter);

app.listen(3000, () => {
    console.log('服务启动成功，运行地址：http://localhost:3000');
})